Feature Group
bash internal / data manipulations / string manipulation and expansions / command substitution (4)
Loading...
bash
This demonstrates two ways to print the current directory in Bash: using command substitution and a built-in variable.
echo "I'm in $(pwd)" # execs `pwd` and interpolates output echo "I'm in $PWD" # interpolates the variable
bash internaldata manipulationsstring manipulation and expansionscommand substitution